<template>
    <div class="table">
        <div class="crumbs">
            <el-breadcrumb separator="/">
                <el-breadcrumb-item><i class="icon iconfont icon-jifen"></i>分站城市信息</el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <div class="container">
            <el-form ref="form" :model="data" label-width="150px" @submit.native.prevent>
                <el-form-item label="城市名称：">
                    <p v-html="data.name"></p>
                </el-form-item>
                <el-form-item label="城市封面图：">
                    <p><img :src="data.logo" style="width:200px;height:200px"/></p>
                </el-form-item>
                <el-form-item label="分站地址：">
                    <p v-html="data.address"></p>
                </el-form-item>
                <el-form-item label="站长联系方式：">
                    <p >{{data.contact}}</p>
                </el-form-item>
                <el-form-item label="接收投稿邮箱：">
                    <p >{{data.email}}</p>
                </el-form-item>
                <el-form-item label="经度：">
                    <p >{{data.longitude}}</p>
                </el-form-item>
                <el-form-item label="纬度：">
                    <p >{{data.latitude}}</p>
                </el-form-item>
                
                <el-form-item>
                    <!-- <el-button type="primary" @click="onAddGoods">确认发布</el-button> -->
                    <el-button type="primary"  @click="returnList">修改分站城市信息</el-button>
                    
                </el-form-item>
            </el-form>
            
        </div>
        
    </div>
</template>
<script>
import { mapGetters } from 'vuex'
import { getFenzhanCityInfo } from "@/api/branch/activity";
export default {
    name:'activityDetail',
    data (){
        return{
            data:{}
        }
    },
    computed:{
        ...mapGetters(['userInfo']),
    },
    created (){
        // console.log(this.$route.query.id)
        this.getNews();
    },
    filters:{
    },
    methods:{
        getNews (){
                //要查看详情的对象类型：1活动、2动态、3心情、4求购、5供应、6二手
                getFenzhanCityInfo(this.userInfo.city_id).then(response=>{
                    // console.log(response);
                    if(response.code==200){
                        //获取数据
                        
                        // console.log(data);
                        this.data = response.data;
                        //console.log(this.data);
                    }else{
                        this.$notify.error({
                            title: '查询失败',
                            duration:2000,
                            message: '失败原因：'+response.data.msg
                        });
                    }
                })
                
        },
        returnList(){
            this.$router.push({ path: "/branch/city/edit" ,query:{id:this.data.id } });
        }
    }
}
</script>
<style lang="stylus" scoped>
    
</style>


